package org.itboys.fuzion.mysql.orm;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * mysql entity 基类
 */
public class BaseEntity implements Serializable{
	
	private static final long serialVersionUID = -966805571447752850L;
	
	private Long id;
	private Date createTime;
	private Date updateTime;
	private Integer isDelete = 0;//逻辑删除  0：有效   1：无效
	
	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String toString(){
		return ToStringBuilder.reflectionToString(this);
	}
	
	public int hashCode(){
		return HashCodeBuilder.reflectionHashCode(this);
	}


}
